<template>
	<view>
		<nav-bars></nav-bars>
		<!-- 企业 -->
		<view class="status" v-if="isPersonal == false">
			<view class="status_img">
				<image v-if="status == 0" src="https://dev-liankun-1305433883.cos.ap-guangzhou.myqcloud.com/liankun/static/verification/examine.png"></image>
				<image v-if="status == 1" src="https://dev-liankun-1305433883.cos.ap-guangzhou.myqcloud.com/liankun/static/verification/success.png"></image>
				<image v-if="status == 2" src="https://dev-liankun-1305433883.cos.ap-guangzhou.myqcloud.com/liankun/static/verification/fail.png"></image>
			</view>
			<view v-if="status == 0" class="status_title">{{ isIndex ? '审核中' : '提交成功' }}</view>
			<view v-if="status == 1" class="status_title">认证通过</view>
			<view v-if="status == 2" class="status_title">认证未通过</view>

			<view v-if="status == 0" class="status_decs">您的企业信息已提交成功，我们将于1-3个工作日内进行审核完成，请耐心等待！</view>
			<view v-if="status == 1" class="status_decs">您提交的企业信息已经认证通过！</view>
			<view v-if="status == 2" class="status_decs">您提交的企业信息认证未通过，请核对您的企业信息，重新提交认证！</view>
			<view v-if="status == 2" class="status_btn" style="margin-bottom: 30rpx;" @click="BackIndex">重新认证</view>
			<view v-if="status == 2" class="status_Back" @click="BackIndex">返回</view>
			<view v-if="status == 0 || status == 1" class="status_btn" @click="BackBusinessIndex">我知道了</view>
		</view>
		<!-- 个人 -->
		<view class="status" v-if="isPersonal == true">
			<view class="status_img">
				<image v-if="status == 0" src="https://dev-liankun-1305433883.cos.ap-guangzhou.myqcloud.com/liankun/static/verification/examine.png"></image>
				<image v-if="status == 1" src="https://dev-liankun-1305433883.cos.ap-guangzhou.myqcloud.com/liankun/static/verification/success.png"></image>
				<image v-if="status == 2" src="https://dev-liankun-1305433883.cos.ap-guangzhou.myqcloud.com/liankun/static/verification/fail.png"></image>
			</view>
			<view v-if="status == 0" class="status_title">{{ isIndex ? '审核中' : '提交成功' }}</view>
			<view v-if="status == 1" class="status_title">认证通过</view>
			<view v-if="status == 2" class="status_title">认证未通过</view>

			<view v-if="status == 0" class="status_decs">您的信息已提交成功，我们将于1-3个工作日内进行审核完成，请耐心等待！</view>
			<view v-if="status == 1" class="status_decs">您提交的信息已经认证通过！</view>
			<view v-if="status == 2" class="status_decs">您提交的信息认证未通过，请核对您的信息，重新提交认证！</view>

			<view v-if="status == 2 && isPersonal == true" @click="BackIndex" class="status_btn" style="margin-bottom: 30rpx;">重新认证</view>
			<view v-if="status == 2 && isPersonal == false" @click="BackBusinessIndex" class="status_btn" style="margin-bottom: 30rpx;">重新认证</view>
			<!-- <view v-if="status == 2" class="status_Back">返回</view> -->
			<view v-if="status == 0 && isPersonal == true" @click="BackIndex" class="status_btn">我知道了</view>
			<view v-if="status == 0 && isPersonal == false" @click="BackBusinessIndex" class="status_btn">我知道了</view>
		</view>
	</view>
</template>
<script>
export default {
	name: '',
	components: {},
	data() {
		return {
			isPersonal: null, // false企业 ,true个人
			status: null, // 0提交成功   1通过   2不通过
			isIndex: true
		};
	},
	onLoad(options) {
		console.log(options);
		this.isPersonal = options.isPersonal == 'true' ? true : false;
		this.status = options.status;
		this.isIndex = options.isIndex ? true : false;
	},

	methods: {
		// 个人返回
		BackIndex() {
			if (this.isIndex == true) {
				uni.navigateBack({
					delta: 1
				});
			} else {
				uni.navigateBack({
					delta: 2
				});
			}
		},
		BackBusinessIndex() {
			if (this.isIndex == true) {
				uni.navigateBack({
					delta: 1
				});
			} else {
				uni.navigateBack({
					delta: 2
				});
			}
		}
	}
};
</script>
<style lang="less">
page {
	background: #fff;
}
.status {
	padding: 100rpx 50rpx;
	.status_img {
		width: 340rpx;
		height: 340rpx;
		margin: 0 auto;
	}
	.status_title {
		font-size: 42rpx;
		font-weight: bold;
		color: #333333;
		text-align: center;
		margin: 72rpx 0 40rpx 0;
	}
	.status_decs {
		font-size: 26rpx;
		font-weight: 500;
		color: #999999;
		text-align: center;
		padding: 0 56rpx;
		margin-bottom: 100rpx;
	}
	.status_Back {
		height: 90rpx;
		border: 2rpx solid #c3ab7c;
		border-radius: 10rpx;
		font-size: 34rpx;
		font-weight: 500;
		color: #c3ab7c;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.status_btn {
		height: 90rpx;
		background: #c3ab7c;
		border-radius: 10rpx;
		font-size: 34rpx;
		font-weight: 500;
		color: #ffffff;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}
</style>
